﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace View.Control
{
    public partial class StationGroupControl : UserControl
    {
        public StationGroupControl()
        {
            InitializeComponent();
        }

        private void groupBox1_Paint(object sender, PaintEventArgs e)
        {
            e.Graphics.Clear(groupBox1.BackColor);
            e.Graphics.DrawString(groupBox1.Text, groupBox1.Font, Brushes.DarkBlue, 10, 1);
            e.Graphics.DrawLine(Pens.DarkBlue, 1, 7, 8, 7);
            e.Graphics.DrawLine(Pens.DarkBlue, e.Graphics.MeasureString(groupBox1.Text, groupBox1.Font).Width + 8, 7, groupBox1.Width - 2, 7);
            e.Graphics.DrawLine(Pens.DarkBlue, 1, 7, 1, groupBox1.Height - 2);
            e.Graphics.DrawLine(Pens.DarkBlue, 1, groupBox1.Height - 2, groupBox1.Width - 2, groupBox1.Height - 2);
            e.Graphics.DrawLine(Pens.DarkBlue, groupBox1.Width - 2, 7, groupBox1.Width - 2, groupBox1.Height - 2); 
        }

        public void SetTitle(string strTitle)
        {
            this.groupBox1.Text = strTitle;
        }
    }
}
